package cn.shop.cloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @program: shop-parent
 * @ClassName WebSocketApp
 * @description:
 * @author: Mokio
 * @create: 2024−12-27 11:51
 * @Version 2024 2.2 ; jdk1.8.0_181
 **/
@SpringBootApplication
public class WebSocketApp {
    public static void main(String[] args) {
        SpringApplication.run(WebSocketApp.class,args);
    }

    // 扫描注解拿到数据
    // 将带有 @ServerEndpoint 注解的类注册为 WebSocket 端点
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();

    }
}
